/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package main.entities.actors;

import main.environment.IEnvironment;
import main.environment.Location;
import main.environment.Vector;

/**
 *
 * @author williamh
 */
public class PlayerActor extends AbstractActor {

    public PlayerActor(){
        super("./media/creatures/enemyDarkKnight01.png");
        setLocation(new Location(16,16,this));
        setVector(new Vector());
        getLocation().setBounded(false);
    }
    
    @Override
    public void run(IEnvironment e) {
        Location to = 
                    new Location(getLocation(),
                            getVector().x ,
                            getVector().y
                    );
        
        getVector().clear();
        
        setLocation(e.moveTo(getLocation(),to));
    }
}
